<?php


namespace App\Service\Weapp;

use Illuminate\Contracts\Support\DeferrableProvider;
use Illuminate\Support\ServiceProvider;


class WeappServiceProvider extends ServiceProvider implements DeferrableProvider
{

    function register()
    {

        $this->app->bind(WeappInterface::class,function ($app){
            return new App(config('weapp.weapp.appid'),config('weapp.weapp.secret'));
        });

    }

    function boot(){

    }

    /**
     * 延迟提供者
     * Create by Peter
     * 2019/09/17 16:58:24
     * Email:904801074@qq.com
     * @return array
     */
    function provides()
    {

        return [WeappInterface::class];
    }

}
